package com.lzc.tlmail.tlmailware.service.impl;

import com.lzc.common.to.StockTaskDetailto;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lzc.common.utils.PageUtils;
import com.lzc.common.utils.Query;

import com.lzc.tlmail.tlmailware.dao.WareOrderTaskDetailDao;
import com.lzc.tlmail.tlmailware.entity.WareOrderTaskDetailEntity;
import com.lzc.tlmail.tlmailware.service.WareOrderTaskDetailService;


@Service("wareOrderTaskDetailService")
public class WareOrderTaskDetailServiceImpl extends ServiceImpl<WareOrderTaskDetailDao, WareOrderTaskDetailEntity> implements WareOrderTaskDetailService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<WareOrderTaskDetailEntity> page = this.page(
                new Query<WareOrderTaskDetailEntity>().getPage(params),
                new QueryWrapper<WareOrderTaskDetailEntity>()
        );

        return new PageUtils(page);
    }

    /**
     * 查询是否有锁库存工作单子 根据skuid 仓库id
     * @param stockTaskDetailto
     * @return
     */
    @Override
    public WareOrderTaskDetailEntity hasTaskDetail(StockTaskDetailto stockTaskDetailto) {
        return this.getById(stockTaskDetailto.getId());
    }

}